[ACM] Add missing alignment operations for the ACM module.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Thu, 19 Oct 2006 14:14:25 +0000 (15:14 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Thu, 19 Oct 2006 14:14:25 +0000 (15:14 +0100)
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
xen/acm/acm_chinesewall_hooks.c
xen/acm/acm_simple_type_enforcement_hooks.c

index 8071cec1be462ca8fc5159a7e19c39024b62124c..98aea6e4289317d9c3dc3bb1e844423ad9c8ae8a 100644 (file)
@@ -154,6 +154,8 @@ static int chwall_dump_policy(u8 * buf, u32 buf_size)
     ret = ntohl(chwall_buf->chwall_conflict_aggregate_offset) +
         sizeof(domaintype_t) * chwall_bin_pol.max_types;
 
+    ret = (ret + 7) & ~7;
+
     if (buf_size < ret)
         return -EINVAL;
 
index 0f8c8c3818cc592862b5ff5ac0d312ef6beb5366..77e1062408b11003b810445f10e39d20affb7d7f 100644 (file)
@@ -150,6 +150,8 @@ ste_dump_policy(u8 *buf, u32 buf_size) {
     ret = ntohl(ste_buf->ste_ssid_offset) +
         sizeof(domaintype_t)*ste_bin_pol.max_ssidrefs*ste_bin_pol.max_types;
 
+    ret = (ret + 7) & ~7;
+
     if (buf_size < ret)
         return -EINVAL;